//package com.xiaoxu.swaggerphone.controller;
//
//import com.xiaoxu.swaggerphone.domain.pojo.User;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.Parameter;
//import io.swagger.v3.oas.annotations.responses.ApiResponse;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import jakarta.websocket.server.PathParam;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.ArrayList;
//import java.util.List;
//
//@Tag(name = "User", description = "用户管理")
//@RestController
//@RequestMapping("/user")
//public class UserController {
//    // 这个样式看起来更整齐
//    @Operation(summary = "获取用户信息", description = "用户详情")
//    @Parameter(name = "id", description = "用户id")
//    @ApiResponse(responseCode = "200", description = "用户信息")
//    @GetMapping("/{id}")
//    public Respon<?> detail(@PathVariable("id") Integer id) {
//        User user = new User();
//        return new Resp<>(user);
//    }
//
//    @Operation(summary = "新增", description = "新增用户")
//    @io.swagger.v3.oas.annotations.parameters.RequestBody(description = "用户")
//    @ApiResponse(responseCode = "201", description = "成功")
//    @PostMapping("/")
//    public Resp<User> add(@RequestBody User user) {
//        return new Resp<>(user);
//    }
//
//    // 写到一起的示例
//    @Operation(summary = "获取列表",
//            description = "获取用户列表",
//            parameters = {@Parameter(name = "page", description = "页码"),
//                    @Parameter(name = "size", description = "每页数量")},
//            responses = {@ApiResponse(responseCode = "200", description = "用户列表")})
//    @GetMapping("/")
//    public Resp<List<User>> list(@PathParam("page") Integer page, @PathParam("size") Integer size) {
//        return new Resp<>(new ArrayList<>());
//    }
//}
